def test():
    while (True):
        mi = 0
        ma = 0
        nu = 0
        ot = 0
        a = input("请输入：")
        s = len(a)
        for i in a:
            if 'z' >= i >= 'a':
                mi = mi + 1
            if 'Z' >= i >= 'A':
                ma = ma + 1
            if '0' >= i >= '9':
                nu = nu + 1
            if i == '$' or i == '#' or i == '@':
                ot = ot + 1
        if mi < 3 or ma < 2 or ma < 2 or ot < 1:
            print("error")
        elif 10 <= s <= 21:
            print(a)

test()
